<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active {
            width: 100px;
            height: 100px;
            border: 1px solid orange
        }
        
        .error {
            background-color: yellow;
        }
        
        .font {
            color: red;
        }
        
        .font1 {
            color: skyblue;
        }
    </style>
</head>

<body>
    <div id="app">

        <div v-bind:class='[activeClass,errorClass,{font:isFont}]'>测试</div>
        <div v-bind:class='arreyClass'>测试</div>
        <div class='font' v-bind:class='objectClass'>测试</div>
        <div v-bind:class='objectClass' class='font1'>测试</div>

    </div>
    <script src="../vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                activeClass: 'active',
                errorClass: 'error',
                isFont: true,
                arreyClass: ['active', 'error'],
                objectClass: {
                    active: true,
                    error: true,
                    font: true
                }
            },
            methods: {
                handle: function() {

                }
            }
        })
    </script>
</body>

</html>